package com.cryptoneedle.center.source.util;

import com.cryptoneedle.center.config.helper.ConfigPropertyHelper;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;

/**
 * <p>description:  </p>
 *
 * @author CryptoNeedle
 * @date 2025-11-05
 */
public class DsUtil {

    public static HttpEntity<String> httpEntity() {
        return httpEntity("{}");
    }

    public static HttpEntity<String> httpEntity(String body) {
        HttpHeaders headers = new HttpHeaders();
        headers.set("token", ConfigPropertyHelper.dsToken());
        headers.setContentType(MediaType.APPLICATION_JSON);
        return new HttpEntity<>(body, headers);
    }
}